<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>表单</title>
    <style>
      input:valid {
        border: s olid 1px green;
      }

      input:invalid {
        border: solid 1px red;
      }
    </style>
  </head>
  <body>
    <form>
      <input type="email" />
      <button>保存</button>
    </form>
  </body>
</html>
